home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 3.2
/
Ham Radio Version 3.2 (Chestnut CD-ROMs)(1993).ISO
/
packet
/
kiss_64
/
kiss_64.txt
Wrap
Text File
|
1991-02-08
|
2KB
|
60 lines
10 REM DISPLAY PACKETS USING KISS --- C-64 VERSION (600 BAUD)
20 CLOSE 2:PRINT CHR$(147)+CHR$(5)+CHR$(14);: POKE 53280,0:POKE 53281,0
30 OPEN 2,2,3,CHR$(7):H$="0123456789ABCDEF":GET#2,A$
40 PRINT#2,"KISS ON"+CHR$(13)+"RESET"
50 GOSUB 500:IF A<>192 THEN 50
60 GOSUB 500: PRINT "---------------------------------------"
70 TXT$=""
80 GOSUB 450: PRINT "<--";: GOSUB 450
90 IF (A AND 1)=1 THEN 120
100 PRINT "VIA ";
110 GOSUB 450: IF (A AND 1)=0 THEN PRINT ",";: GOTO 110
120 PRINT ": ";
130 REM
140 GOSUB 500: REM GET COMMAND BYTE
150 IF A AND 1 THEN 270 ELSE REM ITS AN INFORMATION FRAME
160 P=(A AND 16)/16:PRINT "INFO FRAME N(RCV)=";INT(A/32);" P=";P;
170 PRINT " N(SENT)=";(A AND 14)/2;
180 GOSUB 500: PID=A : PRINT " PID=";: GOSUB 560: PRINT ": ";
190 GOSUB 500: IF A=192 THEN PRINT: GOTO 50
200 IF PID=207 THEN TXT$=TXT$+A$
210 IF A<32 OR A>126 THEN 250
220 IF A>=65 AND A<=90 THEN PRINT CHR$(A OR 32);: GOTO 190
230 IF A>=97 AND A<=122 THEN PRINT CHR$(A AND 223);: GOTO 190
240 PRINT A$;: GOTO 190
250 PRINT CHR$(158);: GOSUB 560:PRINT CHR$(5);: GOTO 190
260 REM
270 IF A AND 2 THEN 350 ELSE REM ITS A SUPERVISORY FRAME
280 PRINT "SUPERVISORY FRAME N(RCV)=";INT(A/32);"P/F=";P;
290 SS = (A AND 12)/4
300 IF SS=0 THEN PRINT " RECEIVE READY";
310 IF SS=2 THEN PRINT " RECEIVE NOT READY";
320 IF SS=3 THEN PRINT " REJECT";
330 GOTO 190
340 REM
350 PRINT "UNNUMBERED FRAME ";: B=(A AND 12)/4 + (A AND 224)/8
360 IF B=7 THEN PRINT "CONNECT REQUEST P=";
370 IF B=8 THEN PRINT "DISCONNECT REQUEST P=";
380 IF B=3 THEN PRINT "DISCONNECTED MODE F=";
390 IF B=12 THEN PRINT "UNNUMBERED ACKNOWLEDGE F=";
400 IF B=17 THEN PRINT "FRAME REJECT F=";P;":";
410 IF B THEN PRINT P;: GOTO 190
420 PRINT "UNNUMBERED INFORMATION P/F=";P;: GOTO 180
430 PRINT "UNKNOWN TYPE ";: GOSUB 560: PRINT " P/F=";P;"";: GOTO 190
440 REM
450 FOR I=1 TO 6: REM MAKE A CALLSIGN PRINTABLE
460 GOSUB 500: A=INT(A/2):IF A<>32 THEN PRINT CHR$(A);
470 NEXT I
480 GOSUB 500: B=(A AND 30)/2:IF B THEN PRINT -B;
490 RETURN
500 IF PEEK(667)=PEEK(668) THEN 500 :REM GET BYTE FROM TNC
510 GET#2,A$:IF A$=""THEN A$=CHR$(0)
520 A=ASC(A$):IF A<>219 THEN RETURN
530 IF PEEK(667)=PEEK(668) THEN 530
540 GET# 2,A$:IF ASC(A$)=220 THEN A$=CHR$(192): A=192: RETURN
550 A$=CHR$(219):A=219: RETURN
560 PRINT MID$(H$,INT(A/16)+1,1)+MID$(H$,(A AND 15)+1,1);:RETURN